package com.demo.shardingsphere.user.service.impl;


import com.demo.shardingsphere.user.mapper.UserMapper;
import com.demo.shardingsphere.user.model.User;
import com.demo.shardingsphere.user.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }


    @Override
    public  User  queryUserById(Long userId) {
        return userMapper.queryUserById(userId);
    }

    @Override
    public List<User> queryUserList() {
        return userMapper.queryUserList();
    }


}
